package com.doubao.chat.config;

import com.doubao.chat.service.AIProviderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Primary;

@Configuration
public class AIProviderConfig {

    /**
     * 配置主要的AI提供商服务，解决多个 Primary Bean 冲突
     */
    @Bean
    @Primary
    public AIProviderService primaryAIProviderService(
            @Qualifier("cozeSDKProviderServiceImpl") AIProviderService cozeService) {
        return cozeService;
    }
}